Skip to content

chat-client: sl-chat-thread's after slot, sub-agent result, user Markdown; sl-drawer frameless; v0.3.0 - #9

Merged
JaimeStill merged 7 commits into
mainfrom
chat-client
Dec 1, 2026
Merged

JaimeStill merged 7 commits into
mainfrom
chat-client

Conversation

@JaimeStill

Copy link
Copy Markdown
Contributor

capstone.data-intelligence.mikoshi · task 21/32 · chat-client

Summary

This is the fourth brief: brief 3 plus the close-out you settled in rounds 7–10. chat-client
ends with slices 24–25, which now also fix Settings' focus. Everything else this session surfaced
is staged after the merge, in the plan + retro phase:

  • scroll-regions: web-foundation v0.5.0 holds the page to the viewport and gives every
    collection and dialog its own scroll region, with web-components v0.4.0, webappgen and
    Mikoshi aligned, plus the dialog focus convention.

  • narrow-layout, chat-usage, and search-client with the global Upload and event log.

  • The principle pages for future web sessions.

  • Built now, slices 20–23, before the tag:

    • Sub-agent results stop reading as "User": the session read gives each result the service
      delivered as a subagent_result item, and a redirected message as your text with to.
    • Cyan accent, set in app.css. The tree's selected row is a square cyan tint with strong
      text and no edge bar. The composer's focus outline is no longer clipped.
    • A one-line status bar under the thread: the answer's state at the start, and an empty
      slot at the end for chat-usage. The gap above the input is the bar plus a small space.
    • The decision notice names every waiting call's tool and agent, e.g. "history (main
      agent), extract (Tape sweep)", quoting the session's first message.
  • web-components v0.3.0 (to be tagged):

    • sl-chat-thread gains:
      • an after slot inside its frame, followed as it grows;
      • a collapsed "Sub-agent · " result line, its analysis linked;
      • your messages as Markdown with line breaks kept;
      • a fix for the race that stopped it following.
    • From the second brief: tables keep words whole, and sl-drawer gains frameless.
  • After the tag, slices 24–25:

    • The client pins v0.3.0.
    • The decisions move into the thread's after slot. The thread becomes the only scroll, with
      its border whole, filling the pane from the first message, and it follows while you're at
      the end.
    • Results show as their own line, live and after a reload, and your messages show as Markdown.
    • The side pane goes frameless, and Settings opens on its checked colour again.
    • Then the live walk and captures. Before Mikoshi publishes, I send you those captures to
      check.

Screenshots

Sent alongside this brief:

  • Mikoshi, taken against v0.3.0's components:
    • 10-session-wide, light and dark: the cyan tab and tree selection, and the status bar.
    • 9-session-390px.
    • 4-context-wide: the tinted selection.
    • 18-session-agents-wide: the decisions and the bar. Until slice 24, the thread's top border
      still scrolls away here.
    • 22-notices-wide: the notice naming tools and agents.
  • web-components examples, which slice 24 brings into Mikoshi:
    • wc-subagent-result-line
    • wc-user-markdown
    • wc-after-slot-and-following
  • Full set:
    /tmp/claude-1000/-home-jaime-capstones-capstone-mikoshi/c1e31de3-71b1-4a57-b33e-4f2a84f0ed75/scratchpad/final3/

Core changes

  1. presentTurns (domain/chat): in the read only, a stored user message holding a result's
    JSON becomes {"type":"subagent_result",…}. It must match strictly: no extra members, an id
    naming a child of the session, and a known status. Stored items and the model's input are
    unchanged. Why: the result read as your message.
  2. sl-chat-thread (web-components): the after slot, the subagent_result item, and
    input_text through markdown(text, {breaks: true}). "At the end" is now measured against
    both the current and the last-seen height. Why: so decisions live in the thread's own scroll,
    results read as results, and following doesn't stop mid-answer.
  3. --color-accent: var(--cyan) on :root in app.css. The selected tree row is
    color-mix(… var(--tint), transparent) with no edge. Why: you asked for an accent other than
    pink and no curved one-sided marks.
  4. .session-bar: a fixed one-line grid holding the status and .session-usage. Why: the
    space under the thread is predictable, and chat-usage fills the slot.

Verify

  • capstone-mikoshi mise run check: ✓ Go, lint, sqlint, lints. Web unit 153/153, browser
    126/126, plus 1 skipped until the v0.3.0 pin (the frameless pane).
  • capstone-mikoshi mise run integration: ✓, including the delivered-result read.
  • web-components mise run check: ✓ unit 92/92, browser 486/486.
  1. mise run serve, then open a session → the tab underline and the selected tree row are cyan,
    the selected row has no edge bar, and a single status line sits between the thread and the
    input.
  2. Start a sub-agent and let it finish, then reload →
    curl …/sessions/<session> | jq '.turns[].items[] | select(.type=="subagent_result")' shows
    the result. In the client, the "User" JSON bubble is gone; the line itself arrives with slice
    24.
  3. Leave a call waiting and look at the header's Notices → "start_subagent (main agent) waits
    for a decision, in “…”".
  4. In web-components, run mise run examples and open the chat-thread page → the result line,
    your Markdown with its line breaks, and a form in the after slot, held at the thread's end.

Decided without you

  1. The redirect status ("which is finished") is dropped from the read: to names the sub-agent
    only.
  2. The tree tint mixes with transparent, as web-foundation's --tint documents, and keeps the
    var(--magenta) fallback so the element still works outside Mikoshi. Hover and selection are
    both square.
  3. The notice merges repeats ("search ×2 (main agent)") and names a sub-agent it doesn't know
    yet as "(a sub-agent)".
  4. The ended-sub-agent note sits below the status bar, above the queued strip, beside the input
    it disables.
  5. sl-chat-thread's result item takes a display name, status, link and Markdown content, and
    knows nothing of Mikoshi. It validates each field, and a blank or unsafe link renders no link.
  6. The status bar truncates long text on screen, while its live region still announces all of
    it.
  7. The editor cut seven chat-client Decisions down to their rejected alternatives, now that the
    docs state the rest.

Redirects and escalations

  1. Redirect, brief 1: the chat-only view, tools on demand, save_analysis, the keys, and the
    flush pane (rounds 3–5).
  2. Redirect, brief 2 (live review): the thread's sizing, border and following, results reading
    as "User", the curved selection marks, the pink accent, your messages' Markdown, whitespace
    above the input, and the "Hello?" notice. Round 6 settled them; context usage becomes
    chat-usage and the narrow layout becomes narrow-layout.
  3. Redirect, brief 3: the inset scrollbar (.session-scroll, gone at slice 24), collections
    scrolling in their own region, and dialogs opening on their first control. Rounds 7–10 settled
    them: Settings is fixed here, and the rest is staged as scroll-regions.

Merge danger: one-way door for the web-components v0.3.0 tag only (Release; accepting
authorizes it). Blast radius: web-components (its v0.3.0 consumers) and capstone-mikoshi. Order:

  1. web-components merges, waiting on CI, and v0.3.0 is tagged and released.
  2. Slices 24–25 run on chat-client.
  3. You check the second capture set.
  4. capstone-mikoshi merges, waiting on CI.

Needs you: none

…or v0.3.0

sl-drawer gains `frameless`, a reflected boolean property and attribute in the
style of `modal`. Docked, it drops the aside's border and radius and the
header's and body's padding, and puts the foundation's `visually-hidden` class
on the header, so the h2 stays the aside's accessible name (aria-labelledby)
while taking no row. The rules are scoped to `:host([frameless]) aside`, so the
modal dialog keeps its header, padding, and visible heading. The aside keeps
its --bg-1 surface: the brief named border, radius, and padding only.

In sl-chat-thread, `.markdown table` sets `overflow-wrap: normal`, so the
content's `anywhere` no longer reaches the cells and shrinks the table's
min-content; the table's own overflow-x then scrolls it inside the thread.
Paragraphs keep breaking long words.

The example pages show both: the chat thread has a wide-table state (in the
states and at 20rem; the specimen count is 66), and the drawer page a Frameless
checkbox, which two new screenshot states use (docked at 1280px, and open at
480px with its frame kept).

package.json is 0.3.0; CHANGELOG's Unreleased becomes [0.3.0] - 2026-11-30,
with the drawer under Added and the table under Fixed, ordered Added, Changed,
Fixed; the README installs v0.3.0. Not tagged.
… the line width

Package documentation: the class doc comment's frameless paragraph had split modal's own switch sentence off onto an overlong line, and the sheet's header ran past 100 columns.
… for v0.3.0

- An `after` slot inside the frame, after the items, in a box of its own hidden
  until an element is assigned (set on slotchange, not rendered), so an empty
  slot takes no room. The follower's ResizeObserver watches that box too, and
  measures the last item's and the box's growth together.
- Following: an update reads "at the end" against the current scroll height or
  the one last seen, so a delta arriving after unfollowed growth (slotted
  children, an image) and before the observer's callback keeps following.
  Tested with growth and deltas in one task, and with deltas streamed faster
  than frames, at the end and scrolled up.
- `subagent_result` item `{type, id?, name, status, href?, label?, content?,
  error?}`: status is text to show, not ItemStatus, so an app passes its own
  states (Mikoshi's finished/failed/stopped) through. Validated before render:
  name and status non-empty text, other fields text where given, else skipped
  like an unknown item. Rendered in both modes as a collapsed details,
  "Sub-agent <name> · <status>", holding the link (label, else href; an href
  markdown wouldn't link shows as its label alone), then the error, then the
  content as Markdown, or "No result." when neither.
- A user's input_text renders as Markdown with `breaks: true`; answers keep
  `breaks: false`. markdown() takes `{ breaks }`, and markdown.ts exports
  `linkable(url)`, the link check the result's href reuses.
- Example page: a user message with code, a list, and line breaks; a result
  collapsed (verbose off and on), opened, and failed opened; a decision form
  slotted in a held thread. CHANGELOG 0.3.0, README, and docs updated.
…omments

A sub-agent result's blank href is no link, as a blank label, error, or
content is none (validation-first), with its test case; the after slot's
box takes logical padding; the name/status check is one filled() helper;
ThreadItem's doc comment is a well-formed block and ChatThread's says
name and status must be non-empty; the CHANGELOG's Changed list is one
list.
@JaimeStill
JaimeStill merged commit 7abb4d8 into main Dec 1, 2026
1 check passed
@JaimeStill
JaimeStill deleted the chat-client branch December 1, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant